package com.fengwensen.reflection;

public class Test02 {
    public static void main(String[] args) throws ClassNotFoundException {
        Class<?> C1 =   Class.forName("com.fengwensen.reflection.User");
        System.out.println(C1);

        System.out.println(User.class);

        User user = new User("123",2,3);

        System.out.println(user.getClass());

    }
}

class User{
    private String name;
    private int age;
    private int id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public User(String name, int age, int id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }
}
